package com.sigmazero13.MKDummy.models;

import java.util.ArrayList;
import java.util.List;

public class ReferenceCard {
	
	private String id;
	private String title;
	private String type;
	private List<ReferenceCardSection> sections;

	public ReferenceCard() {
		id = "";
		title = "";
		type = "";
		sections = new ArrayList<ReferenceCardSection>();
	}
	
	public ReferenceCard(ReferenceCard copy) {
		id = copy.getId();
		title = copy.getTitle();
		type = copy.getType();
		sections = new ArrayList<ReferenceCardSection>();
		for (ReferenceCardSection section : copy.getSections()) {
			sections.add(new ReferenceCardSection(section));
		}
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<ReferenceCardSection> getSections() {
		return sections;
	}

	public void setSections(List<ReferenceCardSection> sections) {
		this.sections = sections;
	}
	
	public void addSection(ReferenceCardSection newSection) {
		sections.add(newSection);
	}
	
	public void clear() {
		id = "";
		title = "";
		type = "";
		sections = new ArrayList<ReferenceCardSection>();
	}

}
